import DBUtils


def cz(name):
    sql = "delete from user where username = %s"
    params = [name]
    DBUtils.update(sql, params)



def cz2(name,password):
    sql = 'insert into user(username,password) values(%s,md5(%s))'
    params = [name, password]
    DBUtils.update(sql, params)


def cz3(bankName,bankNumber):
    sql = 'delete from bankcard where cardBank = %s and cardNum = %s'
    params = [bankName, bankNumber]
    DBUtils.update(sql, params)


def cz4(bankNumber):
    sql = 'delete from bankcard where cardNum = %s'
    params = [bankNumber]
    DBUtils.update(sql, params)


def cz5(bankName,type,bankNumber,userId,money,default):
    '42	伊拉克国民银行	2	1234567891548796	1	10000	0'

    sql = 'insert into bankcard values(null,%s,%s,%s,%s,%s,%s)'
    params = [bankName,type,bankNumber,userId,money,default]
    DBUtils.update(sql,params)
